package com.example.demo.batch.demo;

import lombok.extern.slf4j.Slf4j;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.stereotype.Component;

import java.util.Locale;

/**
 * @author huangke
 * @description xxx
 * @date 2021/1/21
 */
@Slf4j
@Component
public class ConvertProcessor implements ItemProcessor<String, String> {
    @Override
    public String process(String data) {
        String dataProcessed = data.toUpperCase(Locale.ROOT);
        log.debug(data + " process data --> " + dataProcessed);
        return dataProcessed;
    }
}